<!doctype html>
<html lang="zh-CN">
<head>
	<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Java RMI远程调用简单示例 | Mike SU</title>
<meta property="og:title" content="Java RMI远程调用简单示例 - Mike SU">
<meta property="og:type" content="article">
	
<meta property="article:published_time" content='2014-11-21T18:26:33&#43;08:00'>
	
	
<meta property="article:modified_time" content='2014-11-21T18:26:33&#43;08:00'>
	
<meta name="Keywords" content="">
<meta name="description" content="Java RMI远程调用简单示例">
	
<meta name="author" content="Mike SU">
<meta property="og:url" content="https://mikesu.net/34/">
	
	<link rel="shortcut icon" href='/favicon.ico'  type="image/x-icon">
	<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/normalize.css/normalize.min.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/purecss/build/pure-min.min.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/purecss/build/grids-responsive-min.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css">

<link rel="stylesheet" href="/css/style.min.css">
	
</head>
<body>
    <div class="body_container">
		<header id="header">
			<div class="site-name ">
	
	<a id="logo" href="/">Mike SU</a>
	<p class="description">Note &amp; Blog</p>
</div>
		    <nav id="nav-menu">
	<a class="" href="/">
		<i class="fa fa-home"> 首页</i>
	</a>
	
	<a  href="/archives/" title="归档">
		<i class='fa fa-archive'></i> 归档
	</a>
	
	<a  href="/about/" title="关于">
		<i class='fa fa-user'></i> 关于
	</a>
	
</nav>
		</header>
        <div id="layout" class="pure-g">
            <div class="pure-u-1 pure-u-md-3-4">
				<main class="content_container">
					
<article class="post">
	<aside class="toc-article">
    <header class="toc-title"><a href="#top">目录</a></header>
    <nav id="TableOfContents">
  <ul>
    <li><a href="#一rmi简介">一、RMI简介</a></li>
    <li><a href="#二使用原生api开发rmi">二、使用原生API开发RMI</a>
      <ul>
        <li><a href="#rmi服务端">RMI服务端</a></li>
        <li><a href="#rmi客户端">RMI客户端</a></li>
      </ul>
    </li>
    <li><a href="#三使用spring开发rmi">三、使用Spring开发RMI</a>
      <ul>
        <li><a href="#rmi服务端-1">RMI服务端</a></li>
        <li><a href="#rmi客户端-1">RMI客户端</a></li>
      </ul>
    </li>
    <li><a href="#四注意事项">四、注意事项</a></li>
    <li><a href="#五建议">五、建议</a></li>
  </ul>
</nav>
</aside>

	<h1 class="post-title">Java RMI远程调用简单示例</h1>
	<div class="post-meta">
	2014年11月21日
	
	</div>
	<div class="post-content">
		<h2 id="一rmi简介">一、RMI简介</h2>
<p>  RMI是Java的一组用于开发分布式应用程序的API。RMI使用Java语言接口定义了远程对象，它集合了Java序列化和Java远程方法协议(Java Remote Method Protocol)。简单地说，这样使原先的程序在同一操作系统的方法调用，变成了不同操作系统之间程序的方法调用。RMI可以分为两部分，客户端和服务端。服务端就是提供服务的，而客户端就是使用服务的。</p>
<h2 id="二使用原生api开发rmi">二、使用原生API开发RMI</h2>
<h3 id="rmi服务端">RMI服务端</h3>
<p>首先定义一个远程接口
RMI远程接口必须继承Remote接口，而且每一个方法都必须定义抛出RemoteException。</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#069;font-weight:bold">import</span> <span style="color:#0cf;font-weight:bold">java.rmi.Remote</span><span style="color:#555">;</span>
<span style="color:#069;font-weight:bold">import</span> <span style="color:#0cf;font-weight:bold">java.rmi.RemoteException</span><span style="color:#555">;</span>

<span style="color:#069;font-weight:bold">public</span> <span style="color:#069;font-weight:bold">interface</span> <span style="color:#0a8;font-weight:bold">HelloRmi</span> <span style="color:#069;font-weight:bold">extends</span> Remote <span style="color:#555">{</span>
    <span style="color:#069;font-weight:bold">public</span> String <span style="color:#c0f">hello</span><span style="color:#555">(</span>String name<span style="color:#555">)</span> <span style="color:#069;font-weight:bold">throws</span> RemoteException<span style="color:#555">;</span>
<span style="color:#555">}</span>
</code></pre></div><p>实现该远程接口
RMI远程接口最简单的实现方法是继承UnicastRemoteObject并实现自己定义的远程接口，使用Naming.bind发布服务。</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#069;font-weight:bold">import</span> <span style="color:#0cf;font-weight:bold">java.rmi.Naming</span><span style="color:#555">;</span>
<span style="color:#069;font-weight:bold">import</span> <span style="color:#0cf;font-weight:bold">java.rmi.RemoteException</span><span style="color:#555">;</span>
<span style="color:#069;font-weight:bold">import</span> <span style="color:#0cf;font-weight:bold">java.rmi.registry.LocateRegistry</span><span style="color:#555">;</span>
<span style="color:#069;font-weight:bold">import</span> <span style="color:#0cf;font-weight:bold">java.rmi.server.UnicastRemoteObject</span><span style="color:#555">;</span>

<span style="color:#069;font-weight:bold">public</span> <span style="color:#069;font-weight:bold">class</span> <span style="color:#0a8;font-weight:bold">HelloRmiImpl</span> <span style="color:#069;font-weight:bold">extends</span> UnicastRemoteObject <span style="color:#069;font-weight:bold">implements</span> HelloRmi <span style="color:#555">{</span>

    <span style="color:#069;font-weight:bold">private</span> <span style="color:#069;font-weight:bold">static</span> <span style="color:#069;font-weight:bold">final</span> <span style="color:#078;font-weight:bold">long</span> serialVersionUID <span style="color:#555">=</span> 8269168352188938724L<span style="color:#555">;</span>

    <span style="color:#09f;font-style:italic">//由于集成了UnicastRemoteObject,必须实现一个抛出RemoteException的构造函数。
</span><span style="color:#09f;font-style:italic"></span>    <span style="color:#069;font-weight:bold">protected</span> <span style="color:#c0f">HelloRmiImpl</span><span style="color:#555">()</span> <span style="color:#069;font-weight:bold">throws</span> RemoteException <span style="color:#555">{</span>
        <span style="color:#069;font-weight:bold">super</span><span style="color:#555">();</span>
    <span style="color:#555">}</span>

    <span style="color:#99f">@Override</span>
    <span style="color:#069;font-weight:bold">public</span> String <span style="color:#c0f">hello</span><span style="color:#555">(</span>String name<span style="color:#555">)</span> <span style="color:#069;font-weight:bold">throws</span> RemoteException <span style="color:#555">{</span>
        <span style="color:#069;font-weight:bold">return</span> <span style="color:#c30">&#34;Hello &#34;</span> <span style="color:#555">+</span> name <span style="color:#555">+</span> <span style="color:#c30">&#34; ，I&#39;m RMI！&#34;</span><span style="color:#555">;</span>
    <span style="color:#555">}</span>

    <span style="color:#09f;font-style:italic">//启动服务
</span><span style="color:#09f;font-style:italic"></span>    <span style="color:#069;font-weight:bold">public</span> <span style="color:#069;font-weight:bold">static</span> <span style="color:#078;font-weight:bold">void</span> <span style="color:#c0f">main</span><span style="color:#555">(</span>String<span style="color:#555">[]</span> args<span style="color:#555">)</span> <span style="color:#555">{</span>
        <span style="color:#069;font-weight:bold">try</span> <span style="color:#555">{</span>
            HelloRmi helloRmi <span style="color:#555">=</span> <span style="color:#069;font-weight:bold">new</span> HelloRmiImpl<span style="color:#555">();</span>
            <span style="color:#09f;font-style:italic">//注册端口
</span><span style="color:#09f;font-style:italic"></span>            LocateRegistry<span style="color:#555">.</span><span style="color:#309">createRegistry</span><span style="color:#555">(</span>1099<span style="color:#555">);</span>
            Naming<span style="color:#555">.</span><span style="color:#309">bind</span><span style="color:#555">(</span><span style="color:#c30">&#34;rmi://localhost:1099/helloRmi&#34;</span><span style="color:#555">,</span> helloRmi<span style="color:#555">);</span>
            System<span style="color:#555">.</span><span style="color:#309">out</span><span style="color:#555">.</span><span style="color:#309">print</span><span style="color:#555">(</span><span style="color:#c30">&#34;HelloRmi Start!&#34;</span><span style="color:#555">);</span>
        <span style="color:#555">}</span> <span style="color:#069;font-weight:bold">catch</span> <span style="color:#555">(</span>Exception e<span style="color:#555">)</span> <span style="color:#555">{</span>
            e<span style="color:#555">.</span><span style="color:#309">printStackTrace</span><span style="color:#555">();</span>
        <span style="color:#555">}</span>
    <span style="color:#555">}</span>
<span style="color:#555">}</span>
</code></pre></div><h3 id="rmi客户端">RMI客户端</h3>
<p>使用Naming.lookup查找RMI服务。</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#069;font-weight:bold">import</span> <span style="color:#0cf;font-weight:bold">java.rmi.Naming</span><span style="color:#555">;</span>

<span style="color:#069;font-weight:bold">public</span> <span style="color:#069;font-weight:bold">class</span> <span style="color:#0a8;font-weight:bold">HelloRmiClient</span> <span style="color:#555">{</span>
    <span style="color:#069;font-weight:bold">public</span> <span style="color:#069;font-weight:bold">static</span> <span style="color:#078;font-weight:bold">void</span> <span style="color:#c0f">main</span><span style="color:#555">(</span>String<span style="color:#555">[]</span> args<span style="color:#555">)</span> <span style="color:#555">{</span>
        <span style="color:#069;font-weight:bold">try</span> <span style="color:#555">{</span>
            <span style="color:#09f;font-style:italic">//发现服务
</span><span style="color:#09f;font-style:italic"></span>            HelloRmi helloRmi <span style="color:#555">=</span> <span style="color:#555">(</span>HelloRmi<span style="color:#555">)</span> Naming<span style="color:#555">.</span><span style="color:#309">lookup</span><span style="color:#555">(</span><span style="color:#c30">&#34;rmi://localhost:1099/helloRmi&#34;</span><span style="color:#555">);</span>
            System<span style="color:#555">.</span><span style="color:#309">out</span><span style="color:#555">.</span><span style="color:#309">println</span><span style="color:#555">(</span>helloRmi<span style="color:#555">.</span><span style="color:#309">hello</span><span style="color:#555">(</span><span style="color:#c30">&#34;Mike SU&#34;</span><span style="color:#555">));</span>
        <span style="color:#555">}</span> <span style="color:#069;font-weight:bold">catch</span> <span style="color:#555">(</span>Exception e<span style="color:#555">)</span> <span style="color:#555">{</span>
            e<span style="color:#555">.</span><span style="color:#309">printStackTrace</span><span style="color:#555">();</span>
        <span style="color:#555">}</span>
    <span style="color:#555">}</span>
<span style="color:#555">}</span>
</code></pre></div><h2 id="三使用spring开发rmi">三、使用Spring开发RMI</h2>
<h3 id="rmi服务端-1">RMI服务端</h3>
<p>首先定义一个远程接口，使用Spring的好处是你的接口不需要继承java.rmi.Remote接口。</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#069;font-weight:bold">public</span> <span style="color:#069;font-weight:bold">interface</span> <span style="color:#0a8;font-weight:bold">HelloSpringRmi</span> <span style="color:#555">{</span>
    <span style="color:#069;font-weight:bold">public</span> String <span style="color:#c0f">hello</span><span style="color:#555">(</span>String name<span style="color:#555">);</span>
<span style="color:#555">}</span>
</code></pre></div><p>实现该接口</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#069;font-weight:bold">import</span> <span style="color:#0cf;font-weight:bold">org.springframework.remoting.rmi.RmiServiceExporter</span><span style="color:#555">;</span>

<span style="color:#069;font-weight:bold">public</span> <span style="color:#069;font-weight:bold">class</span> <span style="color:#0a8;font-weight:bold">HelloSpringRmiImpl</span> <span style="color:#069;font-weight:bold">implements</span> HelloSpringRmi <span style="color:#555">{</span>

    <span style="color:#99f">@Override</span>
    <span style="color:#069;font-weight:bold">public</span> String <span style="color:#c0f">hello</span><span style="color:#555">(</span>String name<span style="color:#555">)</span> <span style="color:#555">{</span>
        <span style="color:#069;font-weight:bold">return</span> <span style="color:#c30">&#34;Hello &#34;</span> <span style="color:#555">+</span> name <span style="color:#555">+</span> <span style="color:#c30">&#34; ，I&#39;m Spring RMI！&#34;</span><span style="color:#555">;</span>
    <span style="color:#555">}</span>

    <span style="color:#09f;font-style:italic">//启动Spring RMI 服务
</span><span style="color:#09f;font-style:italic"></span>    <span style="color:#069;font-weight:bold">public</span> <span style="color:#069;font-weight:bold">static</span> <span style="color:#078;font-weight:bold">void</span> <span style="color:#c0f">main</span><span style="color:#555">(</span>String<span style="color:#555">[]</span> args<span style="color:#555">)</span> <span style="color:#555">{</span>
        <span style="color:#069;font-weight:bold">try</span> <span style="color:#555">{</span>
            <span style="color:#09f;font-style:italic">//创建Spring RMI 服务
</span><span style="color:#09f;font-style:italic"></span>            HelloSpringRmi helloSpringRmi <span style="color:#555">=</span> <span style="color:#069;font-weight:bold">new</span> HelloSpringRmiImpl<span style="color:#555">();</span>
            <span style="color:#09f;font-style:italic">//使用Spring提供的RmiServiceExporter暴露服务
</span><span style="color:#09f;font-style:italic"></span>            RmiServiceExporter rmiServiceExporter <span style="color:#555">=</span> <span style="color:#069;font-weight:bold">new</span> RmiServiceExporter<span style="color:#555">();</span>
            <span style="color:#09f;font-style:italic">//设置 RMI 服务
</span><span style="color:#09f;font-style:italic"></span>            rmiServiceExporter<span style="color:#555">.</span><span style="color:#309">setService</span><span style="color:#555">(</span>helloSpringRmi<span style="color:#555">);</span>
            <span style="color:#09f;font-style:italic">//设置 RMI 服务名称
</span><span style="color:#09f;font-style:italic"></span>            rmiServiceExporter<span style="color:#555">.</span><span style="color:#309">setServiceName</span><span style="color:#555">(</span><span style="color:#c30">&#34;HelloSpringRmi&#34;</span><span style="color:#555">);</span>
            <span style="color:#09f;font-style:italic">//设置 RMI 服务接口
</span><span style="color:#09f;font-style:italic"></span>            rmiServiceExporter<span style="color:#555">.</span><span style="color:#309">setServiceInterface</span><span style="color:#555">(</span>HelloSpringRmi<span style="color:#555">.</span><span style="color:#309">class</span><span style="color:#555">);</span>
            <span style="color:#09f;font-style:italic">//设置 RMI 绑定端口
</span><span style="color:#09f;font-style:italic"></span>            rmiServiceExporter<span style="color:#555">.</span><span style="color:#309">setRegistryPort</span><span style="color:#555">(</span>1099<span style="color:#555">);</span>
            <span style="color:#09f;font-style:italic">//启动 RMI 服务
</span><span style="color:#09f;font-style:italic"></span>            rmiServiceExporter<span style="color:#555">.</span><span style="color:#309">prepare</span><span style="color:#555">();</span>
            System<span style="color:#555">.</span><span style="color:#309">out</span><span style="color:#555">.</span><span style="color:#309">print</span><span style="color:#555">(</span><span style="color:#c30">&#34;HelloSpringRmi Start!&#34;</span><span style="color:#555">);</span>
        <span style="color:#555">}</span> <span style="color:#069;font-weight:bold">catch</span> <span style="color:#555">(</span>Exception e<span style="color:#555">)</span> <span style="color:#555">{</span>
            e<span style="color:#555">.</span><span style="color:#309">printStackTrace</span><span style="color:#555">();</span>
        <span style="color:#555">}</span>
    <span style="color:#555">}</span>
<span style="color:#555">}</span>
</code></pre></div><p>上面是直接使用代码来运行，也可以通过Spring的配置文件来部署服务</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-xml" data-lang="xml"><span style="color:#309;font-weight:bold">&lt;bean</span> <span style="color:#309">id=</span><span style="color:#c30">&#34;helloSpringRmi&#34;</span> <span style="color:#309">class=</span><span style="color:#c30">&#34;com.example.HelloSpringRmiImpl&#34;</span><span style="color:#309;font-weight:bold">/&gt;</span>

<span style="color:#309;font-weight:bold">&lt;bean</span> <span style="color:#309">class=</span><span style="color:#c30">&#34;org.springframework.remoting.rmi.RmiServiceExporter&#34;</span><span style="color:#309;font-weight:bold">&gt;</span>
    <span style="color:#309;font-weight:bold">&lt;property</span> <span style="color:#309">name=</span><span style="color:#c30">&#34;serviceName&#34;</span> <span style="color:#309">value=</span><span style="color:#c30">&#34;HelloSpringRmi&#34;</span><span style="color:#309;font-weight:bold">/&gt;</span>
    <span style="color:#309;font-weight:bold">&lt;property</span> <span style="color:#309">name=</span><span style="color:#c30">&#34;service&#34;</span> <span style="color:#309">ref=</span><span style="color:#c30">&#34;helloSpringRmi&#34;</span><span style="color:#309;font-weight:bold">/&gt;</span>
    <span style="color:#309;font-weight:bold">&lt;property</span> <span style="color:#309">name=</span><span style="color:#c30">&#34;serviceInterface&#34;</span> <span style="color:#309">value=</span><span style="color:#c30">&#34;com.example.HelloSpringRmi&#34;</span><span style="color:#309;font-weight:bold">/&gt;</span>
    <span style="color:#309;font-weight:bold">&lt;property</span> <span style="color:#309">name=</span><span style="color:#c30">&#34;registryPort&#34;</span> <span style="color:#309">value=</span><span style="color:#c30">&#34;1199&#34;</span><span style="color:#309;font-weight:bold">/&gt;</span>
<span style="color:#309;font-weight:bold">&lt;/bean&gt;</span>
</code></pre></div><h3 id="rmi客户端-1">RMI客户端</h3>
<p>直接代码运行</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#069;font-weight:bold">import</span> <span style="color:#0cf;font-weight:bold">org.springframework.remoting.rmi.RmiProxyFactoryBean</span><span style="color:#555">;</span>

<span style="color:#069;font-weight:bold">public</span> <span style="color:#069;font-weight:bold">class</span> <span style="color:#0a8;font-weight:bold">HelloSpringRmiClient</span> <span style="color:#555">{</span>

    <span style="color:#069;font-weight:bold">public</span> <span style="color:#069;font-weight:bold">static</span> <span style="color:#078;font-weight:bold">void</span> <span style="color:#c0f">main</span><span style="color:#555">(</span>String<span style="color:#555">[]</span> args<span style="color:#555">)</span> <span style="color:#555">{</span>
        RmiProxyFactoryBean rmiProxyFactoryBean <span style="color:#555">=</span> <span style="color:#069;font-weight:bold">new</span> RmiProxyFactoryBean<span style="color:#555">();</span>
        rmiProxyFactoryBean<span style="color:#555">.</span><span style="color:#309">setServiceUrl</span><span style="color:#555">(</span><span style="color:#c30">&#34;rmi://localhost:1099/HelloSpringRmi&#34;</span><span style="color:#555">);</span>
        rmiProxyFactoryBean<span style="color:#555">.</span><span style="color:#309">setServiceInterface</span><span style="color:#555">(</span>HelloSpringRmi<span style="color:#555">.</span><span style="color:#309">class</span><span style="color:#555">);</span>
        rmiProxyFactoryBean<span style="color:#555">.</span><span style="color:#309">afterPropertiesSet</span><span style="color:#555">();</span>
        HelloSpringRmi helloSpringRmi <span style="color:#555">=</span> <span style="color:#555">(</span>HelloSpringRmi<span style="color:#555">)</span>rmiProxyFactoryBean<span style="color:#555">.</span><span style="color:#309">getObject</span><span style="color:#555">();</span>
        System<span style="color:#555">.</span><span style="color:#309">out</span><span style="color:#555">.</span><span style="color:#309">println</span><span style="color:#555">(</span>helloSpringRmi<span style="color:#555">.</span><span style="color:#309">hello</span><span style="color:#555">(</span><span style="color:#c30">&#34;Mike SU&#34;</span><span style="color:#555">));</span>
    <span style="color:#555">}</span>

<span style="color:#555">}</span>
</code></pre></div><p>配置文件部署</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-xml" data-lang="xml"><span style="color:#309;font-weight:bold">&lt;bean</span> <span style="color:#309">id=</span><span style="color:#c30">&#34;HelloSpringRmi&#34;</span> <span style="color:#309">class=</span><span style="color:#c30">&#34;org.springframework.remoting.rmi.RmiProxyFactoryBean&#34;</span><span style="color:#309;font-weight:bold">&gt;</span>
    <span style="color:#309;font-weight:bold">&lt;property</span> <span style="color:#309">name=</span><span style="color:#c30">&#34;serviceUrl&#34;</span> <span style="color:#309">value=</span><span style="color:#c30">&#34;rmi://localhost:1099/HelloSpringRmi&#34;</span><span style="color:#309;font-weight:bold">/&gt;</span>
    <span style="color:#309;font-weight:bold">&lt;property</span> <span style="color:#309">name=</span><span style="color:#c30">&#34;serviceInterface&#34;</span> <span style="color:#309">value=</span><span style="color:#c30">&#34;com.example.HelloSpringRmi&#34;</span><span style="color:#309;font-weight:bold">/&gt;</span>
<span style="color:#309;font-weight:bold">&lt;/bean&gt;</span>
</code></pre></div><h2 id="四注意事项">四、注意事项</h2>
<ol>
<li>Spring开发的RMI客户端可以调用原生API开发的RMI服务端。</li>
<li>如果服务接口继承了Remote接口，原生API开发的RMI客户端可以调用Spring开发的RMI服务端，否则不行。</li>
<li>如果服务提供方是动态代理（Proxy.newProxyInstance）生成的，使用原生API暴露服务，客户端是无法调用的，但是如果使用Spring开发RMI的服务端，则客户端可以调用。因为Sping已经把这个情况在内部进行处理了。</li>
</ol>
<h2 id="五建议">五、建议</h2>
<ol>
<li>服务接口尽量继承Remote接口，这样不管是原生API开发或者Spring进行开发，都可以兼容。</li>
<li>服务端建议使用Spring开发，更方便一点，可以避免一些麻烦，例如上面提到的动态代理的问题。</li>
</ol>

	</div>
	
	
<div class="post-nav">
	
	
	<a class="pre" href="/33/">通过WebRTC实现网页间文件传输</a>
	
	
	
	
	<a class="next" href="/35/">搭建 JavaScript 开发环境</a>
	
	
</div>

	
<div class="post-archive">
    <ul class="post-copyright">
        <li><strong>原文作者：</strong><a rel="author" href="https://mikesu.net">Mike SU</a></li>
        <li style="word-break:break-all"><strong>原文链接：</strong><a href="https://mikesu.net/34/">https://mikesu.net/34/</a></li>
        <li><strong>版权声明：</strong>本作品采用<a rel="license" href="https://creativecommons.org/licenses/by/4.0/">署名 4.0 国际 (CC BY 4.0)</a>进行许可。</li>
    </ul>
</div>
<br/>


	

	
    

    
    
</article>

				</main>
            </div>
			<div class="pure-u-1-4 hidden_mid_and_down">
			    <div id="sidebar">
				    <section class="widget">
<form class="search-form" action='/search/' method="get" accept-charset="utf-8" _lpchecked="1">
      
      <input type="text" name="q" maxlength="20" placeholder="Search">
	  
</form>
</section>
					
					<section class="widget">
<h3 class="widget-title"><i class="fa fa-file-o"> 最近文章</i></h3>
<ul class="widget-list">
    
    <li>
        <a href="/35/" title="搭建 JavaScript 开发环境">搭建 JavaScript 开发环境</a>
    </li>
    
    <li>
        <a href="/34/" title="Java RMI远程调用简单示例">Java RMI远程调用简单示例</a>
    </li>
    
    <li>
        <a href="/33/" title="通过WebRTC实现网页间文件传输">通过WebRTC实现网页间文件传输</a>
    </li>
    
    <li>
        <a href="/32/" title="Boot2docker通过Samba实现文件夹共享">Boot2docker通过Samba实现文件夹共享</a>
    </li>
    
    <li>
        <a href="/31/" title="docker 使用代理连接 Docker Hub">docker 使用代理连接 Docker Hub</a>
    </li>
    
    <li>
        <a href="/30/" title="Boot2docker通过VirtualBox Guest Additions实现目录共享">Boot2docker通过VirtualBox Guest Additions实现目录共享</a>
    </li>
    
    <li>
        <a href="/29/" title="绿色版Solr安装配置">绿色版Solr安装配置</a>
    </li>
    
    <li>
        <a href="/28/" title="我的博客之路">我的博客之路</a>
    </li>
    
    <li>
        <a href="/27/" title="Pelican支持Swiftype搜索">Pelican支持Swiftype搜索</a>
    </li>
    
    <li>
        <a href="/26/" title="启用免费版MarkdownPad2的Markdown扩展模式">启用免费版MarkdownPad2的Markdown扩展模式</a>
    </li>
    
</ul>
</section>
					
					
				</div>
			</div>
			<div class="pure-u-1 pure-u-md-3-4">
				<footer id="footer">
					<div>
	Copyright &copy; 2021 <a href="https://mikesu.net">Mike SU</a>
	
</div>
<div>
	Powered by<a href="https://gohugo.io/" target="_black" rel="nofollow"> Hugo</a>
	Theme by<a href="https://github.com/tufu9441/maupassant-hexo" target="_black"> Maupassant</a>
</div>
<a id="rocket" href="#top"></a>
					<script type="text/javascript" src="//cdn.bootcdn.net/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script type="text/javascript" src="/js/totop.js"></script>

					
	<script type="text/javascript" src="/js/toc.js"></script>

				</footer>
			</div>
        </div>
    </div>
</body>
</html>